home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
476-500
/
disk_497
/
request
/
request.doc
< prev
next >
Wrap
Text File
|
1992-05-06
|
3KB
|
94 lines
Request
by Stefan Sticht
PUBLIC DOMAIN
IMPORTANT: Request requires Kickstart and Workbench 2.0 (at least
Kickstart 37.*) !!
Request opens an EasyRequester (AutoRequester) with user text and
gadgets. Designed for use in script files; a sophisticated
replacement for ask
Usage: Request <text> [TITLE <title>] [GADGETS <gad1|gad2|gad3|...>]
[Screen <publicscreenname>]
<text>:
Text to be displayed in the Requester. Default is no Text.
TITLE <title>:
The title for the requester.
GADGETS:
You may specify up to 20 gadgets. Gadgets are seperated by a "|". If
no gadget is specified, an "OK" gadget will be used.
Screen <publicscreenname>:
The name of the public screen, where the requester should open. If no
name specified, the requester will open on the default public screen.
If the specified screen can't be found, a code of 20 will be returned!
Which gadget the user selected can be examined by the ReturnCode: If
you use the Workbench 2.0 Shell, look at the local varibale RC for the
ReturnCode. From ARexx you may examine the variable RC. If you only
specify one gadget, the returncode therefore will be 0. If you
specify more than one gadget, the leftmost gadget will be 1, the
rightmost one will be 0. The gadgets between will be 2, 3, 4 etc.
Return codes of gadgets:
1 2 3 4 5 6 7 8 9 10 ... 0
| |
leftmost gadget -+ +- rightmost gadget
Try out these examples:
Request "This is a test!" TITLE "Test:" GADGETS "O.K."
Request "This shows you the return codes of the Gadgets:" GADGETS "RC=1|RC=2|RC=3|RC=0"
Request "Multi*Nlines*Nshown*Nhere!" GADGETS "YES|NO"
Request "This is a test on the CED screen!" SCREEN CygnusEdScreen1
; --- CUT HERE ---
; Here's a script for testing Request
Request "Do you like this requester?" TITLE "A question:" GADGETS "Yes|Dont' know|NO"
Set ANSWER $RC
Echo "Returncode was" $ANSWER
If $ANSWER EQ 1
Echo "You like it!"
EndIf
If $ANSWER EQ 2
Echo "But you should know!"
EndIf
If $ANSWER EQ 0
Echo "Why not?"
EndIf
UnSet ANSWER
; --- CUT HERE ---
Return codes:
40: Error in command line!
30: Can't open intuition.library V37 or higher
20: Named public screen can't be found!
anything under 20: The number of the gadget, the user pressed.
Send bug-reports, enhancement-requests, questions, gifts(!) to:
---------------------------------------------------------------
Stefan Sticht
Bibereckerweg 40a
D-8390 Passau 18
FRG
or (better) EMail to:
Internet: cbmvax.commodore.com!cbmehq!cbmger!edith!sticht@rutgers.EDU
or: IWSTICHT@ibm.rz.uni-passau.de
Fido-Net: Stefan Sticht (2:242/16:4)